<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>运行时配置</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="odbc.installation.html">« 安装</a></li>
      <li style="float: right;"><a href="uodbc.resources.html">资源类型 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="uodbc.setup.html">安装/配置</a></li>
    <li>运行时配置</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="odbc.configuration" class="section">
 <h2 class="title">运行时配置</h2>
 <p class="simpara">
这些函数的行为受 <var class="filename">php.ini</var> 中的设置影响。
</p>
 <p class="para">
  <table class="doctable table">
   <caption><strong>Unified ODBC Configuration Options</strong></caption>
   
    <thead>
     <tr>
      <th>名字</th>
      <th>默认</th>
      <th>可修改范围</th>
      <th>更新日志</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.default-db" class="link">odbc.default_db</a> *</td>
      <td>NULL</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.default-user" class="link">odbc.default_user</a> *</td>
      <td>NULL</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.default-pw" class="link">odbc.default_pw</a> *</td>
      <td>NULL</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.allow-persistent" class="link">odbc.allow_persistent</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.check-persistent" class="link">odbc.check_persistent</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.max-persistent" class="link">odbc.max_persistent</a></td>
      <td>&quot;-1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.max-links" class="link">odbc.max_links</a></td>
      <td>&quot;-1&quot;</td>
      <td>PHP_INI_SYSTEM</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.defaultlrl" class="link">odbc.defaultlrl</a></td>
      <td>&quot;4096&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.defaultbinmode" class="link">odbc.defaultbinmode</a></td>
      <td>&quot;1&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

     <tr>
      <td><a href="odbc.configuration.html#ini.uodbc.defaultcursortype" class="link">odbc.default_cursortype</a></td>
      <td>&quot;3&quot;</td>
      <td>PHP_INI_ALL</td>
      <td class="empty">&nbsp;</td>
     </tr>

    </tbody>
   
  </table>

  <blockquote class="note"><p><strong class="note">注意</strong>: 
   <span class="simpara">
    Entries marked with * are not implemented yet.
   </span>
  </p></blockquote>
  有关 PHP_INI_* 样式的更多详情与定义，见 <a href="configuration.changes.modes.html" class="xref">配置可被设定范围</a>。
 </p>
 
 <p class="para">这是配置指令的简短说明。</p>
 
 <p class="para">
 <dl>
   
   <dt id="ini.uodbc.default-db">
    <code class="parameter">odbc.default_db</code>
    <span class="type">string</span>
   </dt>

   <dd>

    <p class="para">
     ODBC data source to use if none is specified in
     <span class="function"><a href="function.odbc-connect.html" class="function">odbc_connect()</a></span> or
     <span class="function"><a href="function.odbc-pconnect.html" class="function">odbc_pconnect()</a></span>.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.default-user">
    <code class="parameter">odbc.default_user</code>
    <span class="type">string</span>
   </dt>

   <dd>

    <p class="para">
     User name to use if none is specified in
     <span class="function"><a href="function.odbc-connect.html" class="function">odbc_connect()</a></span> or
     <span class="function"><a href="function.odbc-pconnect.html" class="function">odbc_pconnect()</a></span>.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.default-pw">
    <code class="parameter">odbc.default_pw</code>
    <span class="type">string</span>
   </dt>

   <dd>

    <p class="para">
     Password to use if none is specified in
     <span class="function"><a href="function.odbc-connect.html" class="function">odbc_connect()</a></span> or
     <span class="function"><a href="function.odbc-pconnect.html" class="function">odbc_pconnect()</a></span>.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.allow-persistent">
    <code class="parameter">odbc.allow_persistent</code>
    <span class="type">bool</span>
   </dt>

   <dd>

    <p class="para">
     Whether to allow persistent ODBC connections.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.check-persistent">
    <code class="parameter">odbc.check_persistent</code>
    <span class="type">bool</span>
   </dt>

   <dd>

    <p class="para">
     Check that a connection is still valid before reuse.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.max-persistent">
    <code class="parameter">odbc.max_persistent</code>
    <span class="type">int</span>
   </dt>

   <dd>

    <p class="para">
     The maximum number of persistent ODBC connections per process.
    </p>
   </dd>

  
  
  
   <dt id="ini.uodbc.max-links">
    <code class="parameter">odbc.max_links</code>
    <span class="type">int</span>
   </dt>

   <dd>

    <p class="para">
     The maximum number of ODBC connections per process, including
     persistent connections.
    </p>
   </dd>

  
   
   <dt id="ini.uodbc.defaultlrl">
    <code class="parameter">odbc.defaultlrl</code>
    <span class="type">int</span>
   </dt>

   <dd>

    <p class="para">
     Handling of LONG fields. Specifies the number of bytes returned to
     variables.
     See <span class="function"><a href="function.odbc-longreadlen.html" class="function">odbc_longreadlen()</a></span> for details.
    </p>

    <span class="simpara">当使用 <span class="type">int</span>
时, 其值以字节来衡量。还可以使用在 <a href="faq.using.html#faq.using.shorthandbytes" class="link">FAQ</a> 中描述的速记符。</span>

   </dd>

  
  
  
   <dt id="ini.uodbc.defaultbinmode">
    <code class="parameter">odbc.defaultbinmode</code>
    <span class="type">int</span>
   </dt>

   <dd>

    <p class="para">
     Handling of binary data.
     See <span class="function"><a href="function.odbc-binmode.html" class="function">odbc_binmode()</a></span> for details.
    </p>
   </dd>

  

  
   <dt id="ini.uodbc.defaultcursortype">
    <code class="parameter">odbc.default_cursortype</code>
    <span class="type">int</span>
   </dt>

   <dd>

    <p class="para">
     Controls the ODBC cursor model.
     Possible values are <strong><code>SQL_CURSOR_FORWARD_ONLY</code></strong>,
     <strong><code>SQL_CURSOR_KEYSET_DRIVEN</code></strong>,
     <strong><code>SQL_CURSOR_DYNAMIC</code></strong> and
     <strong><code>SQL_CURSOR_STATIC</code></strong> (default).
    </p>
   </dd>

  
  
 </dl>

 </p>
</div></div></div></body></html>